walk = [(-1, 2), (1, 2), (-2, 1), (2, 1)]
walkList = []

def horse_walk(x=0, y=0, a=[]):
    '''
    Calculate each travel position in the current state and
    iterate.
    '''
    global walkList
    if x == 5 - 1 and y == 9 - 1:
        walkList.append(a[:])
    for i in walk:
        nx, ny = x+i[0], y+i[1]
        if nx >= 0 and nx < 5 and ny >= 0 and ny < 9:
            horse_walk(nx, ny, a + [(nx, ny)])

horse_walk()
for i in walkList:
    print('(0, 0)', end='')
    for j in i:
        print(f'--({str(j[0])},{str(j[1])})', end='')
    print()

